import request from "@/utils/request";

const api = {
  login(params) {
    return request({
      url: "/user/login",
      method: "post",
      
      params:params
    });
  },
  register(params) {
    return request({
      url: "/user/register",
      method: "post",
      params:params
    });
  },

  topList() {
    return request({
      url: "/board/topList",
      method: "get",
    });
  },
  getAllByBoardDetails (id) {
    return request({
      url: "article/getAllByBoardId?boardId="+ id,
      method: "get",
 
    });
  },
  
};

export default api;
